<template>
  <div>
    <zm-form>
      <zm-form-item label="选择影院：">
        <zm-button
          v-if="onlineRule.relationType === '1'"
          type="text"
          @click="
            onLookCinemaName(onlineRule.relationId, onlineRule.relationName)
          "
        >
          {{ onlineRule.relationName }}
        </zm-button>
        <span v-else>{{ onlineRule.relationName }}</span>
      </zm-form-item>
      <zm-form-item label="兑换范围：">
        {{ onlineRule.goodsName }}
      </zm-form-item>
      <zm-form-item label="优惠面值：">
        <div v-if="+onlineRule.isDiscount === 0">
          优惠券抵值金额{{ onlineRule.couponPrice }}元
        </div>
        <div v-if="+onlineRule.isDiscount === 1">
          满{{ onlineRule.fullPrice }}元减{{ onlineRule.reductionPrice }}元
        </div>
      </zm-form-item>
      <zm-form-item label="是否限制使用时间：">
        {{ onlineRule.isLimitUseTime === "0" ? "不限制" : "限制" }}
        <div v-if="+onlineRule.isLimitUseTime === 1">
          {{ onlineRule.useStartTime }} 至 {{ onlineRule.useEndTime }}
        </div>
      </zm-form-item>
    </zm-form>
    <!-- 查看影院 -->
    <look-cinema
      v-if="paramsObj.visible"
      v-model="paramsObj.visible"
      :obj="paramsObj.obj"
    ></look-cinema>
  </div>
</template>

<script>
import tableMixin from '@/mixins/zmTableMixin'
import useRuleMixin from '../useRuleMixin'

export default {
  name: 'SellOnlineDetail',
  components: {},
  mixins: [tableMixin, useRuleMixin],
  inject: ['$detail'],
  data () {
    return {}
  },
  computed: {
    onlineRule () {
      return this.$detail.infoData.onlineRule[0]
    }
  },
  watch: {},
  created () {},
  methods: {}
}
</script>

<style scoped lang='scss'>
</style>
